﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using HPortal.Lib;

namespace HPortal.Module.Menu
{
    public partial class MenufollowPage : PanelControl
    {
        DataTable tbChannel = new DataTable();
        DataTable tbChannelID = new DataTable();
        String menu = "";
        public String ChannelID = "";
        protected void Page_Load(object sender, EventArgs e)
        {
            menu = "<div class=\"outer_border\"> ";
            menu += "<div class=\"inner_border\">";
            menu += "<div id=\"breadcrumb\" class=\"breadcrumb\">";
            menu += "<ul class=\"floatcontainer\">";
            menu += "<li class=\"navbithome\">";
            menu += "<a accesskey=\"1\" href=\"#\"> <img title=\"Home\" alt=\"Home\" src=\"../../Images/navbits_start.gif\"> </a></li>";
            menu += "<li class=\"navbit lastnavbit\">";
            menu += GetChannel(menu);
            menu += "</li></ul>";
            menu += "</div></div></div>";
            followPage.Text = menu;

        }
        public String GetChannel(String menu1)
        {
            String idChannel = request.get_url_var("ChannelID");
            String idpannel = request.get_url_var("PanelID");
            String iddetail = request.get_url_var("DetaiID");
            if (idChannel == null)
            {
                idChannel = "16";
            }
          String sql = "select * From  Channel where channelID='"+idChannel+"'";

            DataTable follow = DatabaseHelper.Select(sql);
            //  String menu1;
            int i = 0;
              menu1 = "Trang chủ / ";
              menu1 += follow.Rows[i]["Name"].ToString();
               

            
            return menu1;
        }
    }
}